<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html"%>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic"%>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"%>
<%@ page contentType="text/html;charset=utf-8"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script type="text/javascript"
	src="<%=request.getContextPath() + "/js/calendar6.js"%>"></script>
<script type="text/javascript"
	src="<%=request.getContextPath() + "/js/popUP.js"%>"></script>
<link href="<%=request.getContextPath() + "/css/bloques.css"%>"
	rel="stylesheet" type="text/css"></link>
<title>Usuarios por Beneficio</title>
</head>
<body>
	<script type="text/javascript">
    
		function fsubsecretaria() {
			document.frmIngresarSubprograma.action = "<%=request.getContextPath()
					+ "/subprogramas/IngresarSubprograma.do"%>";
			document.frmIngresarSubprograma.submit();
		}
	</script>

	<P />
	<P />
	<DIV align="center">
		<table
			style="width: 100%; border: 0; padding: 3px; border-spacing: 3px;">
			<tr>
				<td>
					<DIV align="center" class="titulosenblanco">
						Ingresar Informaci&oacute;n del Beneficio
					</DIV>
				</td>
			</tr>
		</table>
	</DIV>
	<DIV align="center">
		<form name="frmIngresarSubprograma" method="GET"
			action="<%=request.getContextPath()
					+ "/subprogramas/GuardarSubprograma.do"%>">
			<input type="hidden" name="admincodigo1" />
			<div align="center">
				<table style="width: 80%; border: 0;">
					<tr>
						<td class="celdatabla"><STRONG>Nombre&nbsp; (*)</STRONG></td>
						<td>
							<%
								String strNameSubprog = (String) request
										.getAttribute("nameSubprog");
								if (strNameSubprog == null)
									strNameSubprog = "";
							%>
						</td>
					</tr>
					<tr>
						<td class="celdatabla"><STRONG>Programa&nbsp;al&nbsp;que&nbsp;pertenece&nbsp;(*)</STRONG>&nbsp;</td>
						<td>
							<%
								String strCodeprog = (String) request.getAttribute("codeProg");
								if (strCodeprog == null)
									strCodeprog = "1";
							%> 
							<logic:iterate length="1" id="prog" name="programas"
								type="co.gov.medellin.ssti.sub.model.vo.ProgramaVO">
								<html:select name="prog" property="codePrograma"
									value="<%=strCodeprog%>" title="programa" styleClass="formInputOutput300px"
									onchange="fsubsecretaria()">
									<option value="1">Seleccione un Programa</option>
									<html:options name="prog" labelProperty="nombre"
										property="codePrograma" collection="programas" />
								</html:select>
							</logic:iterate>
						</td>
					</tr>
					<logic:present name="coSubSecret">
						<tr>
							<td class="celdatabla"><STRONG>Secretaria</STRONG></td>
							<td>
								<%
									String strSecretaria = (String) request
												.getAttribute("secretaria");
								%> 
								<input type="text" class="form" name="secretaria"
								readonly="readonly" value="<%=strSecretaria%>" maxlength="60"
								size="60" />
							</td>
						</tr>
						<tr>
							<td class="celdatabla"><STRONG>Subsecretaria (*)</STRONG></td>
							<td><logic:iterate length="1" id="subsec" name="coSubSecret"
									type="co.gov.medellin.ssti.sub.model.vo.AreaVO">
									<html:select name="subsec" property="codearea"
										title="subsecretaria" styleClass="form">
										<html:options name="subsec" labelProperty="nombresubarea"
											property="codearea" collection="coSubSecret" />
									</html:select>
								</logic:iterate></td>
						</tr>
					</logic:present>

					<tr>
						<td class="celdatabla"><STRONG>Descripcion </STRONG></td>
						<td>
							<%
								String strDesc = (String) request.getParameter("descripcion");
								strDesc = strDesc.trim();
								if (strDesc == null)
									strDesc = "";
							%> <textarea Class="form" cols="40" rows="5" name="descripcion">
                <%=strDesc%>
              </textarea>
						</td>
					</tr>

					<tr>
						<td width="29%" class="celdatabla"><STRONG>Cada&nbsp;cuanto&nbsp;se&nbsp;entregar&aacute;?
								&nbsp;(*) &nbsp;&nbsp;&nbsp;</STRONG></td>
						<td width="51%">
							<%
								Object strDias = request.getParameter("dias");
								if (strDias == null)
									strDias = "";
							%> <input type="text" name="dias" Class="form"
							value="<%=strDias%>" maxlength="5" size="5"
							onblur="validate(this)" />dias
						</td>
					</tr>

				</table>
			</div>
		</form>
	</DIV>
</body>
</html>